package com.globallogic.oopbasics.competence.generic;

import java.util.List;

/**
 * Type-safe definition of the CompetenceBox interface which allows to compare
 * all <C>-extending classes. Assume that we need to add non-heterogenous
 * Competencies to some Box.
 * 
 * @param <C>
 *            upper bound of T which will be used by comparator.
 * @param <T>
 *            type of the objects contained in the Box.
 */
interface CompetenceBox<C, T extends C> {
	public T get();

	public List<T> getContainer();

	public void put(T element);

	boolean containsSame(CompetenceBox<C, ? extends C> other,
			EqualityComparator<C> comparator);

	public interface EqualityComparator<C> {
		public boolean compare(List<?> first, List<?> second);
	}
}